package com.example.steriousfx.utils.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 解析页面的数据
 *
 * @author gzkemays
 * @since 2021/10/17 14:48
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UrlParsingResult {
  /** 图片地址 */
  List<String> urls;
  /** 网页标题 */
  String title;
  /** 后缀 */
  String suffix = ".jpg";

  public UrlParsingResult(String url, String title, String suffix) {
    this.urls = new ArrayList<>();
    this.urls.add(url);
    this.suffix = suffix;
    this.title = title;
  }
}
